package com.abner.design.patterns.factory.factorymethod.order;

import com.abner.design.patterns.factory.factorymethod.pizza.BjCheesePizza;
import com.abner.design.patterns.factory.factorymethod.pizza.BjPepperPizza;
import com.abner.design.patterns.factory.factorymethod.pizza.Pizza;

import java.util.Calendar;

/**
 * 北京披萨店
 * @Author: abner
 * @Date: 2022-04-25-20:03
 **/
public class BjOrderPizza extends OrderPizza{

    /**
     * 做披萨
     * @param orderType
     * @return
     */
    @Override
    Pizza makePizza(String orderType) {
        Pizza pizza = null;
        if("cheese".equals(orderType)) {
            pizza = new BjCheesePizza();
        } else if ("pepper".equals(orderType)) {
            pizza = new BjPepperPizza();
        }
        return pizza;
    }
}
